<?php include template("manage_header");?>

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="help">
	<div class="dashboard" id="dashboard">
		<ul><?php echo mcurrent_vote('feedback'); ?></ul>
	</div>
    <div id="content" class="coupons-box clear mainwide">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2>check“<?php echo $feedback['username'] ? $feedback['username'] : 'guests'; ?>(IP:<?php echo $feedback['ip']; ?>)”feedback</h2>
					<ul class="filter">
						<li><?php echo date("d-m-Y H:i:s", $feedback['addtime']); ?></li>
						<li><a href="feedback.php">Listar retornos</a></li>
					</ul>
				</div>
                <div class="sect">
					<?php if(!$question_list){?>
						<div class="wholetip clear"><h3>Sem perguntas</h3></div>
					<?php }?>

					<?php if(is_array($question_list)){foreach($question_list AS $index=>$question) { ?>
						<?php if($feedback_question_list[$question['id']]){?>
							<div class="wholetip clear"><h3><?php echo $question['title']; ?></h3></div>
							<div style="margin:0 20px;">
								<p>
									<?php if(is_array($question['options_list'])){foreach($question['options_list'] AS $index=>$options) { ?>
										<?php if($feedback_question_list[$question['id']][$options['id']]){?>
											<?php echo $options['name']; ?>
											<?php echo $options['is_input'] ? (isset($feedback_input_list[$options['id']]) ? '<font color="red">('.$feedback_input_list[$options['id']]['value'].')</font>' : '') : ''; ?>
											<br>
										<?php }?>
									<?php }}?>
								</p>
							</div>
						<?php }?>
					<?php }}?>
				</div>
			</div>
            <div class="box-bottom"></div>
        </div>
    </div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<?php include template("footer");?>
